const router = require('express').Router();
const upload = require('../utils/upload')

router.post('/upload',upload.single('file'),(req,res)=>{
    console.log(req.file)
    //  /static/uploads/xxx
    res.send({
        code: 0,
        path:'/static/uploads/'+req.file.filename,
        msg:"上传成功"
    })
})

module.exports = router;